<?php
include_once ($_SERVER['DOCUMENT_ROOT'].'/global.php');
$array = array();
$BeginTime = date('Y-m-d H:i:s',strtotime($_POST['BeginTime']));
$EndTime = date('Y-m-d H:i:s',strtotime($_POST['EndTime']));
$Minutes = floor((strtotime($EndTime)-strtotime($BeginTime))%86400/60);
$sql="Insert into GongZuoRecord (BuMenId,person_id,BeginTime,EndTime,Minutes,NeiRong,ShenHeRen,ReferTime)
      values(
{$_POST['BuMenId']},{$_POST['person_id']},'{$BeginTime}','{$EndTime}',{$Minutes},'{$_POST['NeiRong']}',{$_POST['ShenHeRen']},now()
)";
$mysqli->query($sql);
echo json_encode('1');
exit;
?>
